package wen.utils;

public class StringUtils {
    public String fileNameLegalize(String fileName, String urlString) {
        if (fileName.length() == 0) {
            if (urlString.length() > 7) return urlString.substring(urlString.length() - 7);
            else return urlString;
        }
        return fileName;
    }

    public String urlLegalize(String urlString) {
        if (!urlString.startsWith("http")) {
            urlString = "http://"+urlString;
        }
        return urlString;
    }
}
